function mm = matching(id, buyers, sellers)
% returns value of the matching function

A = 2;
alpha = .5;
if id == 'S' % for seller
    mm = A * (buyers).^alpha .* (sellers).^(1-alpha) ./ sellers;
elseif id == 'B' % for buyer
    mm = A * (buyers).^alpha .* (sellers).^(1-alpha) ./ buyers;
elseif id == 'mtchng' % function itself
    mm = A * (buyers).^alpha .* (sellers).^(1-alpha);
end